<?php

class Action extends AppModel {
    var $useTable = 'actions';
    var $name = 'Action';

    var $belongsTo = array(
        'ActionType' => array(
            'className' => 'ActionType',
            'foreignKey' => 'action_type_id'
        ),
        'ReturnType' => array(
            'className' => 'DataType',
            'foreignKey' => 'return_type_id'
        )
    );

    var $hasMany = array(
        'Action' => array(
            'className' => 'ActionMapping',
            'foreignKey' => 'action_id'
        ),
        'Guard' => array(
            'className' => 'ActionMapping',
            'foreignKey' => 'guard_id'
        ),
        'Parameter' => array(
            'className' => 'Parameter',
            'foreignKey' => 'action_id'
        )
    );
}

?>
